<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Test : table displaying all trades</title>
    </h:head>
    <h:body>
        <h:form>
            <h:outputText value="#{msg['language.set']}" />
            <h:commandLink value="#{msg['language.english']}" action="#{languageController.setLanguageEnglish}"/> /
            <h:commandLink value="#{msg['language.french']}" action="#{languageController.setLanguageFrench}"/>
        </h:form>
        <br />
        <br />
        <h:dataTable value="#{testShowAllTradesController.allTradesForUser}" var="trade"
                     border="1">                                      
            <h:column>
                <f:facet name="header">
                    <h:outputText value="#{msg['trade.name']}" />
                </f:facet>
                <h:outputText value="#{trade.name}" />                        
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="#{msg['stock.name']} (#{msg['stock.ticker']})" />
                </f:facet>
                <h:outputText value="#{trade.stock.name} (#{trade.stock.ticker})" />                        
            </h:column>
            <h:column>
                <f:facet name="header">                            
                    <h:outputText value="#{msg.direction}" />
                </f:facet>
                <h:outputText value="#{trade.direction.name}" />
            </h:column>                        
            <h:column>
                <f:facet name="header">                            
                    <h:outputText value="#{msg.timeframe}" />
                </f:facet>
                <h:outputText value="#{trade.timeframe.name}" />
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="#{msg.analysis}" />    
                </f:facet>
                <h:outputText value="#{trade.concatAnalyses}" />                
            </h:column>
            <h:column>
                <f:facet name="header">                                                    
                    <h:outputText value="#{msg.signal}" />
                </f:facet>
                <h:outputText value="#{trade.concatSignals}" />
            </h:column>
            <h:column>
                <f:facet name="header">    
                    <h:outputText value="#{msg.tag}" />
                </f:facet>
                <h:outputText value="#{trade.concatTags}" />
            </h:column>                     
        </h:dataTable>
    </h:body>
</html>

